#ifndef __CacheSim__Parser__
#define __CacheSim__Parser__

#include <iostream>
#include <fstream>
#include <stdio.h>

class Parser
{
public:
    enum TraceType {I, L, S, M};
    struct TraceElement
    {
        TraceType type;
        unsigned adress;
        unsigned size;
    };
    
    Parser(const std::string& fileName);
    ~Parser();
    TraceElement *readNextElement();
    
private:
    std::fstream fileToRead;
    TraceElement *element;
};

#endif
